{% extends 'mobile/base.html' %}
{% load static cmstags murl %}
{% block css %}
    <link rel="stylesheet" href="{% static '/css/category.css' %}"/>
{% endblock %}
{% block seo %}
    <title>{{ tag.name }}_第{{ page }}页 - {{ settings.site_title }}</title>
    <meta name="keywords" content="{{ tag.name }}"/>
    <meta name="description" content="包含标签'{{ tag.name }}'的内容"/>

{% endblock %}
{% block navbar %}
    <div class="navbar">
        {% get_tag_random 10 as tags %}
        {% for item in tags %}
            <a href="/tag/{{ item.name }}.html">{{ item.name }}</a>
        {% endfor %}
    </div>
{% endblock %}

{% block main %}
    {% get_tag tag.name page 10 as data %}
    <div class="block">
        <div class="head-title">
            包含<strong style="color: red">{{ tag }}</strong>的结果，总共{{ data.count }}条。
        </div>
        {% for item in data.list %}
            <a href="{% get_article_url item.category__alias item.id %}" class="item">
                <div class="cover">
                    <img src="{{ item.cover }}" onerror="this.src='/static/image/no_image.png'">
                </div>
                <div class="info">
                    <div class="title">{{ item.title }}</div>
                    <div class="summary">{{ item.summary|slice:':20' }}</div>
                    <div class="time">
                            <span class="date">
                                <span class="iconfont icon-date"></span>
                                <span>{{ item.create_date|date:'Y-m-d' }}</span>
                            </span>
                        <span class="hits">
                                <span class="iconfont icon-yanjing"></span>
                                <span>{{ item.hits }}</span>
                            </span>
                    </div>
                </div>
            </a>
        {% endfor %}
{#        {% get_category_page category.alias as url %}#}
        {% get_mobile_paginator data.num_pages page 5 data.url %}
    </div>

{% endblock %}